package com.project.service.impl;

import com.project.bean.PermissionBean;
import com.project.mapper.IPermissionMapper;
import com.project.service.IPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 权限实现类
 */
@Service
@Transactional
public class PermissionServiceImpl implements IPermissionService {
    @Autowired
    private IPermissionMapper permissionMapper;

    @Override
    public List<PermissionBean> findAll() {
        return permissionMapper.selectList(null);
    }

    @Override
    public List<PermissionBean> findByRoleIdArray(Integer[] roleIdArray) {
        return permissionMapper.findByRoleIdArray(roleIdArray);
    }
}
